Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Nov 12, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on adding error handling for localStorage operations across various components and hooks, ensuring that unhandled errors do not disrupt the application's functionality.

Detailed summary

  • Wrapped localStorage.setItem and localStorage.getItem calls in try-catch blocks to handle potential errors gracefully.
  • Updated ThemeSwitcher.tsx, RightSection.tsx, useLocalStorage.ts, Banner.tsx, and webStorage.ts with error handling logic.
  • Maintained existing functionality while enhancing robustness against localStorage failures.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 10:49pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 10:49pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 10:49pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 10:49pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2024

🦋 Changeset detected

Latest commit: 895b4d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase. packages labels Nov 12, 2024
@MananTank MananTank marked this pull request as ready for review November 12, 2024 17:53
Copy link
Member Author

MananTank commented Nov 12, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.8 KB (0%) 896 ms (0%) 2.7 s (-34.45% 🔽) 3.5 s
thirdweb (cjs) 105.11 KB (0%) 2.2 s (0%) 4.9 s (-11.57% 🔽) 7 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 163 ms (+7.39% 🔺) 277 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 94 ms (+54.77% 🔺) 104 ms
thirdweb/react (minimal + tree-shaking) 18.79 KB (+0.05% 🔺) 376 ms (+0.05% 🔺) 530 ms (+22.38% 🔺) 906 ms

@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.53%. Comparing base (e958e75) to head (895b4d1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/utils/storage/webStorage.ts 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5397      +/-   ##
==========================================
+ Coverage   45.52%   45.53%   +0.01%     
==========================================
  Files        1070     1070              
  Lines       55665    55671       +6     
  Branches     4030     4032       +2     
==========================================
+ Hits        25341    25350       +9     
+ Misses      29637    29633       -4     
- Partials      687      688       +1     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e958e75
packages 40.64% <80.00%> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
packages/thirdweb/src/utils/storage/webStorage.ts 62.50% <80.00%> (-4.17%) ⬇️

... and 4 files with indirect coverage changes

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 12, 2024

Merge activity

  • Nov 12, 4:40 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 12, 4:44 PM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Unit Tests', 'check_linear_in_pr_body').
  • Nov 14, 5:49 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 14, 5:50 PM EST: A user merged this pull request with the Graphite merge queue.

MananTank added a commit that referenced this pull request Nov 12, 2024
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing error handling for `localStorage` operations across various components, ensuring that unhandled errors do not disrupt functionality.

### Detailed summary
- Wrapped `localStorage.setItem` and `localStorage.getItem` calls in `try-catch` blocks to handle potential errors.
- Updated `ThemeSwitcher`, `RightSection`, `useLocalStorage`, `Banner`, and `webLocalStorage` to ignore errors gracefully.
- Maintained existing functionality while improving robustness.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 11-12-catch_localstorage_getitem_and_setitem_unhandled_errors branch from 8bbdbb0 to 4c95ee3 Compare November 12, 2024 21:41
MananTank added a commit that referenced this pull request Nov 13, 2024
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing error handling for `localStorage` operations across various components, ensuring that unhandled errors do not disrupt functionality.

### Detailed summary
- Wrapped `localStorage.setItem` and `localStorage.getItem` calls in `try-catch` blocks to handle potential errors.
- Updated `ThemeSwitcher`, `RightSection`, `useLocalStorage`, `Banner`, and `webLocalStorage` to ignore errors gracefully.
- Maintained existing functionality while improving robustness.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@MananTank MananTank force-pushed the 11-12-catch_localstorage_getitem_and_setitem_unhandled_errors branch from 4c95ee3 to 7d8a1af Compare November 13, 2024 15:21
@gregfromstl gregfromstl changed the title Catch localStorage getItem and setItem unhandled errors [Dashboard] Fix: Catch localStorage getItem and setItem unhandled errors Nov 13, 2024
@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 13, 2024
## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing error handling for `localStorage` operations across various components, ensuring that unhandled errors do not disrupt functionality.

### Detailed summary
- Wrapped `localStorage.setItem` and `localStorage.getItem` calls in `try-catch` blocks to handle potential errors.
- Updated `ThemeSwitcher`, `RightSection`, `useLocalStorage`, `Banner`, and `webLocalStorage` to ignore errors gracefully.
- Maintained existing functionality while improving robustness.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard. merge-queue Adds the pull request to Graphite's merge queue. packages Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants